import java.util.Scanner;

public class Grade {
    public static void main(String[] args) {
        Scanner num = new Scanner(System.in);
        int a = num.nextInt();
        if (a >= 90)
            System.out.println("A");
        else if (a >= 60)
            System.out.println("B");
        else
            System.out.println("C");
    }
}
